import rxAjax from '@/assets/js/ajax.js';

//流程实例跟踪 api接口
export const myBpmApi = {
    baseUrl:'/api-bpm/bpm/core/bpmInst/myBpmInsts',
    trackUrl:'/api-bpm/bpm/core/bpmInstTracked'
};

myBpmApi.removeTracked =function(instId) {
    let params={instId:instId};
    let url= myBpmApi.trackUrl + '/removeTracked';
    return rxAjax.postForm(url,params);
}

myBpmApi.getByInstId=function (instId) {
    var url='/api-bpm/bpm/core/bpmInstCc/getByInstId';
    var obj={instId:instId};
    return rxAjax.postForm(url,obj);
}

myBpmApi.doRetrieveTask =function(parameter) {
    var url= '/api-bpm/bpm/core/bpmTaskTransfer/doRetrieveTask';
    return rxAjax.postJson(url,parameter);
}

myBpmApi.getMessageHandler=function () {
    var url= 'api-system/system/core/message/getMessageHandler';
    return rxAjax.get(url);
}

//通过定义获取视图
myBpmApi.updRead=function (cpId) {
    var url= '/api-bpm/bpm/core/bpmInstCc/updRead';
    var obj={cpId:cpId};
    return rxAjax.postForm(url,obj);
}

export  default myBpmApi;

